package com.yanqu.road.entity.activity.dragonboatrace;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description 赛龙舟玩家信息表
 * @Author cwq
 * @Data 2021/5/11 11:04
 */
@FieldTypeAnnotation(tableName = "t_u_activity_dragonboatrace_role_data")
public class DragonBoatRaceUserData extends DataObject {

    @FieldTypeAnnotation(select = true, update = true, desc = "活动id")
    private int activityId;

    @FieldTypeAnnotation(select = true, update = true, desc = "玩家id")
    private long userId;

    @FieldTypeAnnotation(desc = "今日参赛次数")
    private int times;

    @FieldTypeAnnotation(desc = "已领取到的地点奖励")
    private int placeId;

    @FieldTypeAnnotation(desc = "上次参赛时间(s)")
    private int lastTimeJoinTime;

    @FieldTypeAnnotation(desc = "今日已参赛门客id")
    private List<Integer> patronsList = new ArrayList<>();

    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public int getTimes() {
        return times;
    }
    public void setTimes(int times) {
        if (this.times != times) {
            this.times = times;
            setOp(DataStatus.Update);
        }
    }

    public int getPlaceId() {
        return placeId;
    }
    public void setPlaceId(int placeId) {
        if (this.placeId != placeId) {
            this.placeId = placeId;
            setOp(DataStatus.Update);
        }
    }

    public int getLastTimeJoinTime() {
        return lastTimeJoinTime;
    }
    public void setLastTimeJoinTime(int lastTimeJoinTime) {
        if (this.lastTimeJoinTime != lastTimeJoinTime) {
            this.lastTimeJoinTime = lastTimeJoinTime;
            setOp(DataStatus.Update);
        }
    }

    public List<Integer> getPatronsList() {
        return patronsList;
    }
    public void setPatronsList(List<Integer> patronsList) {
        if (null == patronsList){
            return;
        }
        if (this.patronsList == null || !this.patronsList.equals(patronsList)) {
            this.patronsList = patronsList;
            setOp(DataStatus.Update);
        }
    }




}
